package com.it.controller;

import com.alibaba.fastjson.JSON;
import com.it.pojo.MyCo;
import com.it.pojo.MyCollection;
import com.it.service.MyCollectionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/myCollection")
@Api("swaggerDemoController相关的api")
public class MyCollectionController {
    @Resource
    MyCollectionService myCollectionService;

    @RequestMapping("/findCollection/{uid}")
    @ApiOperation(value = "查询收藏医生",notes = "根据uid把所有收藏医生列出显示姓名性别评分")
    public List<MyCo> findCollection(@PathVariable("uid") Integer uid){
/*        List<MyCo> collection = myCollectionService.findCollection(uid);
        String s = JSON.toJSONString(collection);*/
        return myCollectionService.findCollection(uid);
    }


}
